package com.kgc.scd.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created On : 2022/11/16 0016.
 * <p>
 * Author : shiguangchuan
 * <p>
 * Description: ShopCart
 */
@Data
@TableName("shop_cart")
public class ShopCart {

    // 购物车id主键
    private String id;

    // 用户id
    private String userId;

    // 商品id
    private String goodsId;

    // 商品单价
    private Double retailPrice;

    // 计算商品当前总价
    private Double sumPrice;

    // 数量
    private Integer cartNumber;

    // 购物车商品的状态
    private Integer cartStatus;

    // 添加时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date creationTime;

    // 所选商品总价
    @TableField(exist = false)
    private Double sumAll;
}
